<template>
  <div>

  </div>
</template>

<script setup>
import { onBeforeMount, onBeforeUpdate, onMounted, onBeforeUnmount, onUnmounted, onUpdated } from 'vue';

// vue3生命周期只有6个 beforeCrate和created被setup替代

onBeforeMount(() => {
  console.log('dom加载完成之前')
})
onMounted(() => {
  console.log('dom加载完成之后')
})
onBeforeUpdate(() => {
  console.log('数据更新之前')
})
onUpdated(() => {
  console.log('数据更新之后');
})
onBeforeUnmount(() => {
  console.log('实例销毁之前');
})
onUnmounted(() => {
  console.log('实例销毁之后');
})
</script>

<style lang="scss" scoped></style>